import { AxiosInstance } from 'axios';

import { REST } from '@donnu-prod-practice/api-types';

export const createCountryApi = (axiosInstance: AxiosInstance) => ({
  /* -------------------------------------------------------------------------- */
  /*                                     GET                                    */
  /* -------------------------------------------------------------------------- */

  get: () => axiosInstance.get<REST.country.get.Response>('country').then(({ data }) => data),

  /* -------------------------------------------------------------------------- */

  getTask1: () => axiosInstance.get<REST.country.getTask1.Response>('country/task-1').then(({ data }) => data),

  /* -------------------------------------------------------------------------- */

  getTask2: () => axiosInstance.get<REST.country.getTask2.Response>('country/task-2').then(({ data }) => data),

  /* -------------------------------------------------------------------------- */

  getTask3: () => axiosInstance.get<REST.country.getTask3.Response>('country/task-3').then(({ data }) => data),

  /* -------------------------------------------------------------------------- */
  /*                                    / GET                                   */
  /* -------------------------------------------------------------------------- */

  /* -------------------------------------------------------------------------- */
  /*                                    POST                                    */
  /* -------------------------------------------------------------------------- */

  /* -------------------------------------------------------------------------- */
  /*                                   / POST                                   */
  /* -------------------------------------------------------------------------- */

  /* -------------------------------------------------------------------------- */
  /*                                     PUT                                    */
  /* -------------------------------------------------------------------------- */

  /* -------------------------------------------------------------------------- */
  /*                                    / PUT                                   */
  /* -------------------------------------------------------------------------- */

  /* -------------------------------------------------------------------------- */
  /*                                    PATCH                                   */
  /* -------------------------------------------------------------------------- */

  /* -------------------------------------------------------------------------- */
  /*                                   / PATCH                                  */
  /* -------------------------------------------------------------------------- */

  /* -------------------------------------------------------------------------- */
  /*                                   DELETE                                   */
  /* -------------------------------------------------------------------------- */

  /* -------------------------------------------------------------------------- */
  /*                                  / DELETE                                  */
  /* -------------------------------------------------------------------------- */
});
